package com.ehsy.service;

import com.dtflys.forest.annotation.*;
import com.ehsy.common.AjaxResult;
import com.ehsy.common.ResponseVo;
import org.springframework.stereotype.Service;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title RequestMethodService
 * @description
 * @create 2024/6/17 13:48
 */
@Service
public interface RequestMethodService {
    @Get("http://localhost:8080/test/request/json/body")
    ResponseVo<Object> getTest();

    @Post("http://localhost:8080/test/request/json/formBody")
    ResponseVo<Object> postTest();

    @Put("http://localhost:8080/test/request/json/formBody")
    ResponseVo<Object> putTest();

    @HeadRequest("http://localhost:8080/test/request/json/formBody")
    String headTest();

    @Delete("http://localhost:8080/test/request/json/formBody")
    ResponseVo<Object> deleteTest();

    @Options("http://localhost:8080/test/request/json/formBody")
    String optionsTest();

    /**
     * 没有用过这个方法，调用失败，springboot默认关闭这个请求方式
     */
    @TraceRequest("http://localhost:8080")
    ResponseVo<Object> traceTest();

    @Patch("http://localhost:8080/test/request/json/formBody")
    ResponseVo<Object> patchTest();
}
